import Vue from "vue";
import Vuex from 'vuex';

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        routes: [],
        currentAdmin: JSON.parse(window.sessionStorage.getItem('user'))
    },
    mutations: {
        INIT_ROUTES(state, data) {
            state.routes = data;
        },
        INIT_ADMIN(state, data) {
            state.currentAdmin = data;
        },
    },
    actions: {},
})

export default store;
